<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       
       const fruits = {
        0: 'apple',
        1: 'orange',
        2: 'banana',
        length: 3,
      }

        console.log(fruits)
         //伪数组转真数组
         //1、有迭代器接口可以用[...args]
         //2、Array.from
         const result = Array.from(fruits)
         console.log(result)
         //3、Array.prototype.slice.call()
         const result2 =Array.prototype.slice.call(fruits)
         console.log(result2)

    </script>
</body>
</html>